package com.example.demo.controller;

import com.example.demo.cons.DingdianCons;
import com.example.demo.crawler.DeafaultCrawlerImpl;
import com.example.demo.domain.ContentDO;
import com.example.demo.domain.ResultVO;
import com.example.demo.service.AbstractDingdianService;
import com.example.demo.service.MenuService;
import com.example.demo.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class MenuController extends DefalutDingdianController{

    @RequestMapping("/menus")
    @ResponseBody
    public ResultVO content(String url, String dataType) {
        ResultVO resultVO = getResultVO(url, dataType,1);
        return resultVO;
    }

    @Override
    @Resource(name = "menuService")
    public void setService(AbstractDingdianService service) {
        super.setService(service);
    }
}
